<!DOCTYPE html
	PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
	<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $cfg_soft_lang; ?>">
	<title>评论管理</title>
	<script language="javascript" src="../static/js/jquery.js"></script>
	<script src="../static/js/bootstrap.bundle.js"></script>
	<script type="text/javascript" src="js/main.js"></script>
	<script language='javascript'>
		//获得选中文件的文件名
		function getCheckboxItem() {
			var allSel = "";
			if (document.feedback.fid.value) return document.feedback.fid.value;
			for (i = 0; i < document.feedback.fid.length; i++) {
				if (document.feedback.fid[i].checked) {
					if (allSel == "")
						allSel = document.feedback.fid[i].value;
					else
						allSel = allSel + "," + document.feedback.fid[i].value;
				}
			}
			return allSel;
		}
		function selAll() {
			for (i = 0; i < document.feedback.fid.length; i++) {
				document.feedback.fid[i].checked = true;
			}
		}
		function selNone() {
			for (i = 0; i < document.feedback.fid.length; i++) {
				document.feedback.fid[i].checked = false;
			}
		}
		function selNor() {
			for (i = 0; i < document.feedback.fid.length; i++) {
				if (document.feedback.fid[i].checked == false)
					document.feedback.fid[i].checked = true;
				else
					document.feedback.fid[i].checked = false;

			}
		}
		function delFeedback() {
			var qstr = getCheckboxItem();
			if (qstr == "") ShowMsg("你没选中任何内容！");
			else if (window.confirm('你确定要删除这些评论吗?')) location.href = "feedback_main.php?job=del&fid=" + qstr;
		}
		function delFeedbackIP() {
			var qstr = getCheckboxItem();
			if (qstr == "") ShowMsg("你没选中任何内容！");
			else if (window.confirm('你确定要删除这些评论吗?')) location.href = "feedback_main.php?job=delall&fid=" + qstr;
		}
		function checkFeedback() {
			var qstr = getCheckboxItem();
			if (qstr == "") ShowMsg("您没选中任何内容！");
			else location.href = "feedback_main.php?job=check&fid=" + qstr;
		}
		function editFeedback() {
			var qstr = getCheckboxItem();
			if (qstr == "") ShowMsg("您没选中任何内容！");
			else location.href = "feedback_edit.php?job=edit&fid=" + qstr;
		}
	</script>
	<link rel="stylesheet" href="../static/css/bootstrap.min.css">
	<link href="../static/font-awesome/css/font-awesome.min.css" rel="stylesheet">
	<link href="css/base.css" rel="stylesheet" type="text/css">
</head>

<body background='images/allbg.gif' leftmargin='8' topmargin='8'>
	<table width="98%" border="0" cellpadding="3" align="center" cellspacing="1" bgcolor="#D6D6D6"
		class="table table-bordered maintable mt-3">
		<tr>
			<td height="28" background='images/tbg.gif' style="padding-left:10px;">
				<div style="float:left;">
					<a href='feedback_main.php'><u><b>评论管理</b></u></a>
				</div>
				<div style="float:right;padding-right:10px">
					<form name='form1'>
						关键字：
						<input type='text' size='15' name='keyword' style='width:150'>
						<select name="typeid" style="width:180">
							<option value="0">--请选择--</option>
							{dede:global.openarray /}
						</select>
						<button type="submit" class="btn btn-secondary">搜索</button>
					</form>
				</div>
			</td>
		</tr>
		<form name='feedback'>
			<tr>
				<td height="215" bgcolor="#FFFFFF" valign="top">
					<table width='100%' border='0' cellpadding='0' cellspacing='0' class="table table-borderless">
						{dede:datalist}
						<tr height='25'>
							<td>
								<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#EEF7D2"
									class="table table-borderless">
									<tr bgcolor="#F4FAE4">
										<td width="9%">
											&nbsp;选择 <input name="fid" type="checkbox" class="np" id="fid"
												value="{dede:field.id/}">
										</td>
										<td width="12%">
											用户：{dede:field.username/}
										</td>
										<td width="20%">
											文档：<a href='feedback_main.php?aid={dede:field.aid/}'><u>{dede:field.arctitle
													function="RemoveXSS(@me)"/}</u></a> (<a
												href="archives_do.php?aid={dede:field.aid/}&dopost=viewArchives"
												target="_blank"><u>浏览</u></a>)
											<?php if($fields['replycount'] > 0) { ?><a
												href='feedback_main.php?fid={dede:field.id/}'>（{dede:field.replycount/}条回复）</a>
											<?php } ?>
										</td>
										<td width="18%" align="center">
											IP地址：<a
												href='feedback_main.php?ip={dede:field.ip/}'><u>{dede:field.ip/}</u></a>
										</td>
										<td width="15%">
											时间：{dede:field.dtime function="GetDateTimeMK(@me)" /}
										</td>
										<td width="20%" align="center">
											<a class="btn btn-secondary btn-sm"
												href='feedback_edit.php?id={dede:field.id/}'><i
													class="fa fa-pencil-square-o" aria-hidden="true"></i> 编辑</a>
											<a class="btn btn-secondary btn-sm"
											href='feedback_edit.php?id={dede:field.id/}&dopost=makehtml'>更新文档</a>
										</td>
									</tr>
									<tr align="center" bgcolor="#FFFFFF">
										<td height="28" colspan="6">
											<table width="98%" border="0" cellspacing="0" cellpadding="0">
												<tr>
													<td align="left">
														{dede:field.ischeck function="IsCheck(@me)" /}
														{dede:field.msg function='cn_substr(Text2Html(@me), 50)'/}
													</td>
												</tr>
											</table>
										</td>
									</tr>
								</table>
							</td>
						</tr>
						{/dede:datalist}
						<tr>
							<td height='20' align='center' bgcolor="#F9FCEF">
								{dede:pagelist listsize='5' /}
							</td>
						</tr>
						<tr>
							<td height='30'>
								<table width="98%">
									<tr>
										<td width="30%">
											<button type='button' name='kk1' onClick="selAll()"
												class="btn btn-secondary btn-sm">全选</button>
											<button type='button' name='kk2' onClick="selNone()"
												class="btn btn-secondary btn-sm">取消</button>
											<button type='button' name='kk3' onClick="selNor()"
												class="btn btn-secondary btn-sm">反选</button>
										</td>
										<td align="right">
											<button type='button' name='db' onClick="delFeedbackIP()"
												class="btn btn-secondary btn-sm">删除相同IP的所有评论</button>
											<button type='button' name='db' onClick="delFeedback()"
												class="btn btn-secondary btn-sm">删除评论</button>
											<button type='button' name='db2' onClick="checkFeedback()"
												class="btn btn-secondary btn-sm">审核评论</button>
										</td>
									</tr>
								</table>
							</td>
						</tr>
					</table>
				</td>
			</tr>
		</form>
	</table>
</body>

</html>